﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Smarts.Core
{
    public class StringComparer
    {
        private bool _stringsEqual;
        private string _string1;
        private string _string2;

        private bool _differByCase;
        private bool _differByWhitespace;
        private bool _string1ContainsString2;
        private bool _string2ContainsString1;

        public StringComparer(string String1, string String2)
        {
            _string1 = String1;
            _string2 = String2;
            _stringsEqual = _string1 == _string2;
            _differByCase = (!Equal) && _string1.ToLower() == _string2.ToLower();
            _differByWhitespace = (!Equal) && _string1.Trim() == _string2.Trim();    
        }

        public bool Equal
        {
            get
            {
                return _stringsEqual;
            }
        }

        public bool DifferByCaseOnly
        {
            get
            {
                return _differByCase;
            }
        }

        public bool DifferByWhiteSpaceOnly
        {
            get
            {
                return _differByWhitespace;
            }
        }
    }
}
